import Reflux from "reflux"
import BaseAction,{addDefaultListerns} from "@/base/BaseAction";

const prefix ="/resource/document/";
const api = {
    search: prefix+"search",
    create: prefix+"create",
    edit: prefix+"edit",
    detail:  prefix+"detail",
    enabled: prefix + "enabled",
};

const createAction = () => {
    const Action = Reflux.createActions({
        ...BaseAction,

    });

    addDefaultListerns(Action, api)

    return Action;
};

export {api, createAction}